package com.iretailer.report.model;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @program: report
 * @description:
 * @author: Bennie
 * @create: 2020-06-09 17:05
 **/
@AllArgsConstructor
@Getter
public enum WeatherCode {

    SUNNY(100, "Sunny", "晴"),
    CLOUDY(101, "Cloudy", "多云"),
    FEW_CLOUDS(102, "Few Clouds", "少云"),
    PARTLY_CLOUDY(103, "Partly Cloudy", "晴间多云"),
    OVERCAST(104, "Overcast", "阴"),
    WINDY(200, "Windy", "有风"),
    CALM(201, "Calm", "平静"),
    LIGHT_BREEZE(202, "Light Breeze", "微风"),
    MODERATE(203, "Moderate", "和风"),
    FRESH_BREEZE(204, "Fresh Breeze", "清风"),
    STRONG_BREEZE(205, "Strong Breeze", "强风"),
    HIGH_WIND(206, "High Wind", "疾风"),
    GALE(207, "Gale", "大风"),
    STRONG_GALE(208, "Strong Gale", "烈风"),
    STORM(209, "Storm", "风暴"),
    VIOLENT_STORM(210, "Violent Storm", "狂爆风"),
    HURRICANE(211, "Hurricane", "飓风"),
    TORNADO(212, "Tornado", "龙卷风"),
    TROPICAL_STORM(213, "Tropical Storm", "热带风暴"),
    SHOWER_RAIN(300, "Shower Rain", "阵雨"),
    HEAVY_SHOWER_RAIN(301, "Heavy Shower Rain", "强阵雨"),
    THUNDERSHOWER(302, "Thundershower", "雷阵雨"),
    HEAVY_THUNDERSTORM(303, "Heavy Thunderstorm", "强雷阵雨"),
    THUNDERSHOWER_WITH_HAIL(304, "Thundershower with hail", "雷阵雨伴有冰雹"),
    LIGHT_RAIN(305, "Light Rain", "小雨"),
    MODERATE_RAIN(306, "Moderate Rain", "中雨"),
    HEAVY_RAIN(307, "Heavy Rain", "大雨"),
    EXTREME_RAIN(308, "Extreme Rain", "极端降雨"),
    DRIZZLE_RAIN(309, "Drizzle Rain", "毛毛雨/细雨"),
    RAIN_STORM(310, "Rainstorm", "暴雨"),
    HEAVY_STORM(311, "Heavy Storm", "大暴雨"),
    SEVERE_STORM(312, "Severe Storm", "特大暴雨"),
    FREEZING_RAIN(313, "Freezing Rain", "冻雨"),
    LIGHT_TO_MODERATE_RAIN(314, "Light to moderate rain", "小到中雨"),
    MODERATE_TO_HEAVY_RAIN(315, "Moderate to heavy rain", "中到大雨"),
    HEAVY_RAIN_TO_STORM(316, "Heavy rain to storm", "大到暴雨"),
    STORM_TO_HEAVY_STORM(317, "Storm to heavy storm", "暴雨到大暴雨"),
    HEAVY_TO_SEVERE_STORM(318, "Heavy to severe storm", "大暴雨到特大暴雨"),
    RAIN(399, "Rain", "雨"),
    LIGHT_SNOW(400, "Light Snow", "小雪"),
    MODERATE_SNOW(401, "Moderate Snow", "中雪"),
    HEAVY(402, "Heavy", "大雪"),
    SNOWSTORM(403, "Snowstorm", "暴雪"),
    SLEET(404, "Sleet", "雨夹雪"),
    RAIN_AND_SNOW(405, "Rain And Snow", "雨雪天气"),
    SHOWER_SNOW(406, "Shower Snow", "阵雨夹雪"),
    SNOW_FLURRY(407, "Snow Flurry", "阵雪"),
    LIGHT_TO_MODERATE_SNOW(408, "Light to moderate snow", "小到中雪"),
    MODERATE_TO_HEAVY_SNOW(409, "Moderate to heavy snow", "中到大雪"),
    HEAVY_SNOW_TO_SNOWSTORM(410, "Heavy snow to snowstorm", "大到暴雪"),
    SNOW(499, "Snow", "雪"),
    MIST(500, "Mist", "薄雾"),
    FOGGY(501, "Foggy", "雾"),
    HAZE(502, "Haze", "霾"),
    SAND(503, "Sand", "扬沙"),
    DUS(504, "Dus", "浮尘"),
    SANDSTORMS(507, "Sandstorms", "沙尘暴"),
    HEAVY_SANDSTORM(508, "Heavy Sandstorm", "强沙尘暴"),
    DENSE_FOG(509, "Dense fog", "浓雾"),
    STRONG_FOG(510, "Strong fog", "强浓雾"),
    MODERATE_HAZE(511, "Moderate haze", "中度霾"),
    HEAVY_HAZE(512, "Heavy haze", "重度霾"),
    SEVERE_HAZE(513, "Severe haze", "严重霾"),
    HEAVY_FOG(514, "Heavy fog", "大雾"),
    EXTRA_HEAVY_FOG(515, "Extra heavy fog", "特强浓雾"),
    HOT(900, "Hot", "热"),
    COLD(901, "Cold", "冷"),
    UNKNOWN(999, "Unknown", "未知");

    int code;
    String en;
    String zh;

    public static WeatherCode getByCode(int code) {
        for (WeatherCode weatherCode : WeatherCode.values()) {
            if (weatherCode.code == code) return weatherCode;
        }
        return UNKNOWN;
    }

}